/** this class will serve as a repo for samples on how to use the YoutubeForce library **/

public class YoutubeSamples {

/** getting a list of playlists based on a youtube username **/
public static void getyoutubeplaylist(){
	youtubeforce y = new youtubeforce();
	list<youtubeplaylist> l = y.getuserplaylists('salesforce');
	system.debug(logginglevel.debug, '\n\nlist of salesforce playlists: ' + l + '\n\n');	
}

/** getting a list of videos based on a playlist id **/
public static void getVideosFromPlaylist(){
	YoutubeForce y = new YoutubeForce();
	List<YoutubeVideo> l = y.getVideosFromPlaylist('401F0EF5959CD197');
	system.debug(logginglevel.debug, '\n\nlist of videos (' + l.size() + '): ' + l + '\n\n');		
}

/** getting a list of videos based on a user name **/
public static void getUserFavoriteVideos(){
	YoutubeForce y = new YoutubeForce();
	List<YoutubeVideo> l = y.getUserFavoriteVideos('logmeinusa');
	system.debug(logginglevel.debug, '\n\nlist of videos (' + l.size() + '): ' + l + '\n\n');		
}

/** search for videos based on the keyword provided **/
public static void searchVideos(){
	YoutubeForce y = new YoutubeForce();
	List<YoutubeVideo> l = y.searchVideos('salesforce apex code');
	system.debug(logginglevel.debug, '\n\nlist of videos (' + l.size() + '): ' + l + '\n\n');		
}

/** get a list of standard feed videos **/
public static void getStandardFeed(){
	YoutubeForce y = new YoutubeForce();
	List<YoutubeVideo> l = y.getStandardFeed('top_rated');
	system.debug(logginglevel.debug, '\n\nlist of videos (' + l.size() + '): ' + l + '\n\n');		
}

/** get a list of regional standard feed videos **/
public static void getRegionalStandardFeed(){
	YoutubeForce y = new YoutubeForce();
	List<YoutubeVideo> l = y.getRegionalStandardFeed('top_rated','US');
	system.debug(logginglevel.debug, '\n\nlist of videos (' + l.size() + '): ' + l + '\n\n');		
}
}